import { createRouter, createWebHistory } from "vue-router";
import selectRouter from "@/router/route";
import config from "@/config/index.js"
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: selectRouter,
});
router.beforeEach((to, from, next) => {
  if (to.name !== "managerLogin" && config.active != 'dev') next({ name: "managerLogin" });
  else next();
});
export default router;
